// 第四个部署
// 1、需要设置奋斗狗NFT合约 (部署时完成)
// 2、需要设置随机合约地址 (部署时完成)
// gas 0.05
const { BigNumber } = require('ethers');

async function main() {
    const meatdataUrl = "https://nftswap-hm.oss-cn-chengdu.aliyuncs.com/mysteryBox/metadata/";  // 盲盒 url
    const StruggleDogAddress = "0x9cB811C7E14c4b7743b580BA607cDD6793f1371F";  // 奋斗狗NFT 合约地址
    const LotteryAddress = "0x9A446fE2F88F2dF97b688B402FC535F619d93C90";  //随机合约地址

    const BlindBox = await ethers.getContractFactory("BlindBox");
    const instance = await upgrades.deployProxy(BlindBox, [meatdataUrl,StruggleDogAddress,LotteryAddress], {initializer:'__BlindBox_init'});
    await instance.deployed();
    console.log("BlindBox deployed to:", instance.address);
}

main()
    .then(() => process.exit(0))
    .catch((error) => {
        console.error(error);
        process.exit(1);
    });
